package com.itheima.test;

import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;

import java.io.IOException;


public class 删除 {
    public static void main(String[] args) throws IOException {
        SqlSession sqlSession = new SqlSessionFactoryBuilder().build(Resources.getResourceAsStream("mybatis-conﬁg.xml")).openSession(true);

        int delete = sqlSession.delete("UserMapper.delete", 1);

        System.out.println("共"+delete+"行受到影响");

        sqlSession.close();


    }
}
